<?php
//=======================================
//###################################
// Kayako Web Solutions
//
// Source Copyright 2001-2004 Kayako Web Solutions
// Unauthorized reproduction is not allowed
// License Number: $%LICENSE%$
// $Author: vshoor $ ($Date: 2005/08/07 05:20:29 $)
// $RCSfile: cron_cleanup.php,v $ : $Revision: 1.2 $ 
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
//###################################
//=======================================

if (!defined("INSWIFT")) {
	trigger_error("Unable to process $PHP_SELF", E_USER_ERROR);
}

global $cron;

$cron->logentry($_SWIFT["cronid"], "success");

// Cleanup logs
$cleartime = DATENOW - (intval($_SWIFT["settings"]["cpu_logcleardays"])*86400);

$dbCore->query("DELETE FROM `". TABLE_PREFIX ."synclog` WHERE `dateline` < '". $dbCore->escape($cleartime) ."';");
?>